package com.huawei.esdk.tp.cxf.enumgen;

public abstract class SiteFromMapping {

    public final static int INTERNAL = 0;
    public final static int EXTERNAL = 1;
    public final static int E_CONFERENCE = 2;
    public final static int LYNC_SITE = 3;
    public final static int MIN = 0;
    public final static int MAX = 3;
    
	public static Integer enum2Int(SiteFrom videoFormat) {
	    if (null == videoFormat)
        {
            return null;
        }
		switch (videoFormat) {
		case INTERNAL: {
			return INTERNAL;
		}
		case EXTERNAL: {
			return EXTERNAL;
		}
		case E_CONFERENCE: {
			return E_CONFERENCE;
		}
		case LYNC_SITE: {
			return LYNC_SITE;
		}
		default: {
			return null;
		}
		}
	}
	/**
	 * 此处需要加一个默认值
	 * 默认值用于预约会议的时候
	 * 	 * 用户输入错误时，返回错误码
	 * @param num
	 * @return
	 */
	public static SiteFrom int2Enum(Integer num) {
		if(null==num){
			return null;
		}
		switch (num) {
		case INTERNAL: {
			return SiteFrom.INTERNAL;
		}
		case EXTERNAL: {
			return SiteFrom.EXTERNAL;
		}
		case E_CONFERENCE: {
			return SiteFrom.E_CONFERENCE;
		}
		case LYNC_SITE: {
			return SiteFrom.LYNC_SITE;
		}
		default: {
			return null;
		}
		}
	}

}
